<script>
// --定义一个类
class Student {
  constructor(grades, name) {
    this.grades = grades;
    this.name = name;
  }
  sum() {
    return this.a + this.b;
  }
}

const xiaoming = new Student(5, "小明");
console.log(xiaoming);

class Phone {
  constructor(size, model, brand, price) {
    this.size = size;
    this.model = model;
    this.brand = brand;
    this.price = price;
  }
  play() {}
}
</script>
<template><div><h3>ES6 类相关测试</h3></div></template>
<style></style>